package com.crazy.base.common.core.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult <T> {

    private List<T> records;

    private long total;

    private long current;

    private long size;

    public static <T> PageResult<T> of(List<T> list, long total, long current, long size) {
        return new PageResult<>(list, total, current, size);
    }
}
